<?php
//require_once dirname(dirname(__DIR__))."/common.php";
require_once dirname(__DIR__)."/login_filter.php";
use app\cls\tom\Response;
use app\cls\tom\SysResource;
use app\cls\tom\Tools;
use app\model\Users;

$uuid=$Auth['uuid'];
//$uuid=3;
if(empty($_REQUEST['autograph'])){
    Response::output(-1,"缺少参数");
}
if(strlen($_REQUEST['autograph'])>255){
    Response::output(-1,"超过限定字数");
}
//$autograph=htmlspecialchars($_REQUEST['autograph']);
$autograph=$_REQUEST['autograph'];
//var_dump($autograph);exit;
//实例化数据库
$db = SysResource::getDB(true);
$Users = new Users($db);
$update_autograph=$Users->update_autograph($uuid,$autograph);
if($update_autograph){
    Response::output(0,"修改成功");
}else{
    Response::output(-1,"修改失败");
}